<?
$maps = $this->maps;
?>
<script>
    $(function(){


          $('.defaulttable thead td:nth-child(1)').css('width','25px').css('padding-left','5px').css('padding-right','5px');
          $('.defaulttable thead td:nth-child(2)').css('width','150px');
          $('.defaulttable thead td:nth-child(3)').css('width','150px');
          $('.defaulttable thead td:nth-child(4)').css('width','150px');
          $('.defaulttable tbody td:nth-child(1)').css('padding-left','5px').css('padding-right','5px');
          $('.defaulttable tbody td:nth-child(5)').css('padding-left','5px').css('padding-right','5px');



            $('.defaulttable tbody tr:odd').addClass('odd');
          
    });
</script>
<table class="main_table">
    <thead>
    <tr>
        <td>#</td>
        <td>IMG</td>
        <td>Title</td>
        <td>Correct answer</td>
        <td>Answer</td>
    </tr>
    </thead>

    <tbody>
    <? foreach ($maps as $key => $map): ?>
    <tr <? if((@$i++)%2==0):?> class="next" <? endif; ?>>
        <td><?= $key + 1 ?></td>
        <td><a href="/report/view/id/<?= $map['id'] ?>"><img width="50px" src="<?= $map['url'] ?>" alt="<?= $map['title'] ?>"/></a></td>
        <td><?= $map['title'] ?></td>
        <td><?= $map['answer'] ?></td>
        <td><a href="/report/view/id/<?= $map['id'] ?>">View answers(<?= $map['total'] ?>)</a></td>
    </tr>
        <? endforeach; ?>
    </tbody>
</table>

<?php //echo $this->paginationControl($this->paginator, 'Sliding', '/common/paginator/digg_search.phtml'); ?>